/*
 * DexVerify.h
 *
 *  Created on: 2011-7-8
 *      Author: gexiao
 */
/*
 * Dalvik classfile verification
 */
#ifndef DEXVERIFY_H_
#define DEXVERIFY_H_
#include <stdbool.h>

/*
 * Global verification mode. These must be in order from least verification
 * to most. If we're using "exact GC", we may need to perform some of
 * the verification steps anyway.
 */
typedef enum {
	VERIFY_MODE_UNKNOWN=0,
	VERIFY_MODE_NONE,
	VERIFY_MODE_REMOTE,
	VERIFY_MODE_ALL
} DexClassVerifyMode;

/*
 * Bit values for dvmVerifyClass() "verifyFlags" arg.
 *
 * (Verification is currently a prerequisite for optimization, not an
 * after-effect, so we don't currently use VERIFY_ALLOW_OPT_INSTRS.)
 */
enum {
	VERIFY_DEFAULT=0,
	VERIFY_ALLOW_OPT_INSTRS=1,//allow instrs emitted by optimizer
};

bool dvmVerificationStartup(void);

/*
 * Verify a single class.
 */
bool dvmVerifyClass(ClassObject* clazz,int verifyFlags);
#endif /* DEXVERIFY_H_ */
